package com.chixing.day04_oop;

public class TestComputer {
    public static void main(String[] args) {

        //CPU
        //无参
        Cpu cpu1 = new Cpu();
        cpu1.setId(1);
        cpu1.setBrand("zz");
        cpu1.setFactory("江苏");

        //有参
        Cpu cpu2 = new Cpu(2,"qq","苏州");


        System.out.println("CPU1信息: 编号:" + cpu1.getId() +"  型号:" + cpu1.getBrand() + "  厂家:" + cpu1.getFactory());
        System.out.println("CPU2信息: 编号:" + cpu2.getId() +"  型号:" + cpu2.getBrand() + "  厂家:" + cpu2.getFactory());

        //显卡

        VideoCard videoCard1 = new VideoCard();
        videoCard1.setId(11);
        videoCard1.setBrand("ww");
        videoCard1.setFactory("上海");


        VideoCard videoCard2 = new VideoCard(22,"kk","北京");
        System.out.println("显卡1信息: 编号:" + videoCard1.getId() +"  型号:" + videoCard1.getBrand() + "  厂家:" + videoCard1.getFactory());
        System.out.println("显卡2信息: 编号:" + videoCard2.getId() +"  型号:" + videoCard2.getBrand() + "  厂家:" + videoCard2.getFactory());


    }
}
